package com.frxuexi.base.mvi

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.appcompat.app.AppCompatActivity
import androidx.databinding.ViewDataBinding
import androidx.fragment.app.Fragment

abstract class BaseViewFragment<VDB:ViewDataBinding>:Fragment() {

    lateinit var binding:VDB

    override fun onCreateView(
        inflater: LayoutInflater,
        container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View? {
        binding=getBind()
        initView()
        return binding.root
    }

    abstract fun getBind(): VDB

    abstract fun initView()
}